
                <script src="<?php echo base_url('public_source/javascript/jquery-1.9.1.js');?>" type="text/javascript"></script>
<script src="<?php echo base_url('public_source/javascript/jquery-ui.js');?>" type="text/javascript"></script>
<script>
        $(document).ready(function(){
                $("#loai").change(function(){
		$.ajax({
			type: "POST",
			url: "<?php echo site_url("home_admin/ajax_gethang1") ?>",
			data: {maloai : $(this).val()},
			async: true,
			beforeSend: function(){
				$("#result").html("");
			},
			success: function(kq){
				$("#result").html(kq);
			}
		});
                
		return false;
                });
                                
                $("#support input:button").click(function(){
                var url = "<?php echo site_url("home_admin/list_dong");?>" + "/" + $("#hang").val();
                $.ajax({
			type: "POST",
			url: url,
                        data: {ajax1 : "bbb"},
			async: true,
			beforeSend: function(){
				$("#list_table").html("");
                      
			},
			success: function(kq){
				$("#list_table").html(kq);
			}
		});
		return false;
                });
        });
        
        </script>
<?php
echo "<select id='loai' name='loai'>";
    foreach ($loai as $item)
    {
        echo "<option value='".$item["maloai"]."'>";
        echo $item["tenloai"];
        echo "</option>";
    }
    echo "</select>";
?>
